package com.zhn.usermanager.service;

import com.zhn.usermanager.mapper.CarMapper;
import com.zhn.usermanager.pojo.Car;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;

@Service
public class CarService {
    @Resource
    private CarMapper carMapper;
    public Map<String, Object> selectById(int id){
        Car car = carMapper.selectById(id);
        Map<String, Object> map = new HashMap<>();
        map.put("code", 200);
        map.put("msg", "查询成功！");
        map.put("data", car);
        return map;
    }
}
